<!doctype html>
<html>
  <head>
    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=UA-132775238-1"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());
      gtag('config', 'UA-132775238-1');
    </script>
    <script>
      function onSearchChange(option){
        const docEl = document.getElementById('thedoc');
        if (option === 'advanced') {
          docEl.setAttribute('allow-search', 'false');
          docEl.setAttribute('allow-advanced-search', 'true');
        } else if (option==='quick'){
          docEl.setAttribute('allow-search', 'true');
          docEl.setAttribute('allow-advanced-search', 'false');
        } else if (option === 'none') {
          docEl.setAttribute('allow-search', 'false');
          docEl.setAttribute('allow-advanced-search', 'false');
        }
      }

    </script>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
    <link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;600&family=Roboto+Mono&display=swap" rel="stylesheet">
    <link href='../index.css' rel='stylesheet'>
    <script type="module" src="../rapidoc-min.js"></script>
  </head>
  <body>
    <rapi-doc
      id = "thedoc"
      show-info = "true"
      spec-url = "../specs/petstore_extended.yaml"
      show-header= "true"
      allow-advanced-search= "true"
      render-style= "read"
      allow-try = "false"
      regular-font = "Open Sans"
      mono-font = "Roboto Mono"
      use-path-in-nav-bar = "true"
      theme = "light"
    >

    <div slot="nav-logo">
      <div style="display:flex; align-items:center;font-size:12px; font-weight:bold;color:#fafafa">
        Search &nbsp;
        <button class='btn medium' onclick="onSearchChange('none')" >None</button>
        <button class='btn medium' onclick="onSearchChange('quick')" >Quick</button>
        <button class='btn medium' onclick="onSearchChange('advanced')" >Advanced</button>
      </div>
    </div>
  </rapi-doc>
  </body>
</html>
